{include file="Public:header2"/}
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <xblock>
                <div style="padding-bottom: 10px;">
                    <span style="line-height:40px;float:right;">共有数据： {$count}条</span>
                </div>
            </xblock>  
            <table class="layui-table" style="text-align:center">
                <thead>
                <tr>
                    <th>vip图标</th>
                    <th>vip名称</th>
                    <th>积分数量</th>
                    <th>享受折扣</th>
                    <th>权益说明</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="vo"}
                <tr>
                    <td><img src="{PHP} echo imageUrl($vo['imgurl']){/php}" style="width:35px;height:15px;"></td>
                    <td>{$vo['title']}</td>
                    <td>{$vo['condition']}</td>
                    <td>{if $vo.discount > 0}{$vo['discount']*1}折{/if}</td>
                    <td>{$vo['notice']}</td>
                    <td>
                        <a style="text-decoration:none" onclick="vip_edit({$vo.id})" class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">
                            <i class="layui-icon layui-icon-edit"></i>编辑
                        </a>
                    </td>
                </tr>
                {/volist}

                {if condition="empty($list)"}
                <tr><td colspan='10' style="text-align:center;">暂时没有数据！</td></tr>
                {/if}
                </tbody>
            </table>
        </div>
    </div>
</div>
{include file="Public:footer"/}
<script type="text/javascript">
    layui.use(['layer','laydate'], function(){
        var $ = layui.$;

    })

    //编辑奖品
    function vip_edit(id) {
        var url  = "{:url('/admin/vip_edit?id="+id+"')}";
        layer.open({
            type: 2,
            title: '编辑vip',
            shadeClose: false,
            shade: 0.3,
            area: ['80%', '80%'],
            content: url,
        });
    }
    

</script>
</body>
</html>


